<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

/**
 * @property string type
 * @property string language
 * @property int id
 */
class SwitchLanguageRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'type'     => 'required|string|in:panx,customer,store,app,wechat',
            'id'       => 'required|int|min:1',
            'language' => 'required|string',
        ];
    }
}
